package com.yc.consumer.coontroller;


import com.yc.producer.contract.TestService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.web.bind.annotation.*;

/**
 * @author 冉野 E-mail:yangtianrui135@163.com
 * @version 创建时间：2021/7/13 3:57 PM
 */
@RestController
@RequestMapping("/rpc")
public class TestController {



    private final TestService testService;

    public TestController(TestService testService) {

        this.testService = testService;
    }



    @GetMapping("/test")
    public Object test() {
        try {

            return testService.testRpc("sss");
        } catch (Exception e) {

            e.printStackTrace();
        }
        return "";
    }



}
